package org.dtrd.modules.service.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.service.entity.po.DtrdRlPackagePatient;

import java.util.Date;

/**
 * <p>
 * 患者和服务包关系表
 * </p>
 *
 * @author QR
 * @since 2021-12-16
 */
@Getter
@Setter
@ApiModel(value = "患者和服务包关系表详情")
public class PackagePatientRelation {

    @ApiModelProperty(value = "患者id", required = true)
    private Integer patientId;

    @ApiModelProperty(value = "服务包id", required = true)
    private Integer packageId;

    @ApiModelProperty(value = "服务开始时间", required = true)
    private Date startTime;

    @ApiModelProperty(value = "服务结束时间", required = true)
    private Date endTime;


    public PackagePatientRelation parseFromPo(DtrdRlPackagePatient po) {
        patientId = po.getPatientId();
        packageId = po.getPackageId();
        return this;
    }
}
